Week Overview Mon – Fri · 10 hours total

The two services that let machines find each other by name

Every other service in this course — the web server in Week 4, the VPN in Week 5, the Docker containers in Week 6 — depends on machines being able to find each other. IP addresses work, but they are hard to remember and hard to maintain at scale. DHCP and DNS solve those two problems: DHCP assigns addresses automatically, and DNS resolves names to addresses so humans don't have to track IPs.

Week 3 builds both services on S1. Days 1–2 cover DHCP using isc-dhcp-server — scope configuration, DHCP-specific logging via rsyslog, client verification, and reservations. Days 3–4 cover BIND9 DNS — the config file hierarchy, forward and reverse zones, named-checkzone validation, secondary DNS on S2 with zone transfer. The DNS zones built this week are used directly in Week 4 (Nginx virtual host) and Week 5 (VPN). Day 5 is assessment.

A thread from Week 2 ties in here: the /etc/hosts entry for loghost that students added on S2 in Lab 2D gets replaced with a proper DNS A record today. DNS makes that temporary workaround unnecessary.

Week at a glance

Monday
DHCP Server Setup

Install isc-dhcp-server, configure interfaces and dhcpd.conf, DHCP-specific logging via rsyslog, verify S2 gets a lease (Lab 3A)

Tuesday
DHCP Troubleshooting & Reservations

Deliberate config errors, lease database, MAC-based reservations, DORA process deep-dive (Lab 3B)

Wednesday
BIND9 Install & Forward Zone

BIND9 config hierarchy, named.conf.options, named.conf.local, zone file syntax, SOA/NS/A records, named-checkzone (Lab 3C)

Thursday
Reverse Zone, Secondary DNS & dig

PTR records, reverse zone, zone transfer to S2, restrict allow-transfer, dig interrogation (Lab 3D)

Friday
Mini-Assessment 3

Written: DHCP/DNS concepts. Practical: build a working zone from a spec.

Learning Outcomes By end of Week 3, students can…
Configure isc-dhcp-serverSet the listening interface, write a dhcpd.conf scope with lease times, gateway, and DNS options, and verify with a client lease
Direct DHCP events to a custom log fileUse the log-facility directive and rsyslog rules to route DHCP events out of syslog and into a dedicated dhcpd.log
Create a MAC-based DHCP reservationUse a host block in dhcpd.conf to assign a fixed address to S2 based on its MAC address
Explain the BIND9 config file hierarchyDescribe the role of named.conf, named.conf.options, named.conf.local, and named.conf.default-zones
Build a BIND9 forward zoneWrite a zone declaration in named.conf.local, create a zone database file with SOA, NS, A, and CNAME records, and validate with named-checkzone
Build a reverse lookup zoneWrite a zone declaration using the in-addr.arpa format and populate it with PTR records
Configure a secondary DNS serverDefine a type secondary zone on S2 pointing at S1 as the primary, verify zone transfer, and restrict transfers to authorised servers only
Use dig for DNS interrogationQuery a specific server, request all record types, and interpret the output sections (QUESTION, ANSWER, AUTHORITY, ADDITIONAL)
Monday Lecture + Lab 3A · 2 hrs

DHCP protocol, isc-dhcp-server install and scope configuration, DHCP logging

0:00–0:30
Lecture
0:30–1:50
Lab 3A
1:50–2:00
Debrief
Instructor note: The initial failure to start is intentional and educational — isc-dhcp-server requires an interface to be configured before it will run. Students who simply check systemctl status and see "failed" without reading the error message will be stuck. Train them to read the journal output carefully.
Tuesday Lab 3B · 2 hrs

Deliberate errors, lease database, MAC reservations, DORA tcpdump capture

0:00–0:10
Recap
0:10–1:50
Lab 3B
1:50–2:00
Debrief
Note: Before the end of Tuesday, restore S2's Netplan config back to a static IP. The DNS labs need a predictable S2 address. Students who leave S2 on DHCP will have issues when writing zone records in Lab 3C.
Wednesday Lecture + Lab 3C · 2 hrs

DNS hierarchy, BIND9 config files, forward zone, SOA/NS/A records, named-checkzone

0:00–0:10
Recap
0:10–0:40
Lecture
0:40–1:50
Lab 3C
1:50–2:00
Debrief
Instructor note: The trailing dot rule is the most common source of zone file errors. Write a concrete example on the board: if the zone is yourname.net and you write s1 A 192.168.50.1, BIND resolves it to s1.yourname.net. If you write s1. A 192.168.50.1 (with dot), BIND treats it as an absolute name s1. (just "s1", a root-level name) — almost never what you want. If you write s1.yourname.net. (FQDN with trailing dot), it stays as-is. Spend two minutes on this before students start the lab.
Thursday Lab 3D · 2 hrs

Reverse lookup zone, secondary DNS on S2, zone transfer, allow-transfer, dig

0:00–0:10
Recap
0:10–1:45
Lab 3D
1:45–1:55
Bonus
1:55–2:00
Wrap
⭐ Thursday Bonus — dig zone transfer
  • From S1: dig @nsztm1.digi.ninja zonetransfer.me AXFR
  • Read the output — A records, MX records, TXT records, SRV records
  • Ask: "What could an attacker learn from a successful AXFR of an internal zone?" — all server names, all IPs, all mail servers, any internal service hints in TXT/SRV records
  • Compare to what dig @S1-IP yourname.net AXFR now returns after adding allow-transfer — should be refused
Friday Mini-Assessment 3 · 2 hrs

Written (30%) + Practical: build a working zone from spec (70%)

0:00–0:30
Written
0:30–1:45
Practical
1:45–2:00
Review + Preview W5

Mini-Assessment 3 — Topic Coverage

TopicWeightSource
DORA process — steps, broadcast vs unicast, each packet's purpose10%Monday lecture + Lab 3A
dhcpd.conf syntax — scope, range, options, lease times, reservations15%Labs 3A/3B
DHCP logging via rsyslog local0 facility5%Lab 3A
DNS record types — A, PTR, NS, SOA, CNAME, MX15%Wednesday lecture
Zone file syntax — TTL, trailing dot rule, serial format15%Lab 3C
named-checkzone and named-checkconf usage5%Lab 3C
Secondary DNS — zone declaration, zone transfer, allow-transfer15%Lab 3D
Practical zone build20%All week

What you need ready before Monday

All three VMs running with NTP and SSH working from Week 2 Lab 3A, 3B, 3C, 3D handouts printed Week 2 rsyslog/logrotate changes reverted (snapshot restored) S2 static IP confirmed (192.168.50.2) Mini-Assessment 3 printed (Friday) Student name to use as domain name confirmed (e.g. smith.net)
← Week 2 Day 1 Lesson Plan → Week 4 → Course Outline